//
//  annularView.m
//  SKaURobot
//
//  Created by cdong on 16/2/29.
//  Copyright © 2016年 cdong. All rights reserved.
//

#import "annularView.h"

@implementation annularView{
    CGPoint _point;
    
}

-(void)drawRect:(CGRect)rect{
    const CGFloat pi = 3.14159265359;
    
    CGPoint center = CGPointMake(self.frame.size.width / 2, self.frame.size.height / 2);
    UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:center
                                                        radius:152*matchW  //152
                                                    startAngle:3/2.0 * pi
                                                      endAngle:self.endF *pi
                                                     clockwise:YES];
    
    path.lineCapStyle = kCGLineCapSquare;
    path.lineJoinStyle = kCGLineJoinRound;
    path.lineWidth = 6.0*matchW;
    
    UIColor *strokeColor = [RGBColorEncapsulation colorWithRGB:0xaf181f alpha:1];
    [strokeColor set];
    
    [path stroke];
}

@end
